Online documentation - Websydian v6.5 |
WSYBASE/DataAccessRRN
The fetch view of the entity scopes a wrapper function BlockFetchWrapperRRN, that can be used in the grid components used by the WebsydianExpress Ext JS framework.
This function adds the necessary handling of a relative record number position functionality, which makes it possible to use an existing BlockFetch function for retrieving grid data for the Ext JS for WebsydianExpress framework.
It is important to note that this is not a BlockFetch function, it does not perform any data access - it is only a wrapper function that has the same interface as a standard BlockFetch function, the wrapper function must always call a standard BlockFetch function that must retrieve the data.
The ExtWebEditDialog entity inherits from the DataAccessRRN entity. In this context, it provides the functionality for retrieving the data for the grid.
You can implement this in three different ways.
1. If you want to have a BlockFetchRRNWrapper function for your Fetch view, you can let the entity inherit directly from the DataAccessRRN entity:
Source Object | Verb | Target Object |
---|---|---|
MyEntity | is a ENT | WSYBASE/DataAccessRRN |
If you want to use another BlockFetch function that is scoped by the Fetch view to retrieve the data, you must perform the following replacement:
Source Object | Verb | Target Object |
---|---|---|
MyEntity.Fetch.BlockFetchRRNWrapper | replaces FNC
...by FNC |
MyEntity.Fetch.BlockFetch
MyEntity.Fetch.MyBlockFetch |
2. If you want another view to have the BlockFetchWrapperRRN function (when you want another sort of the grid).
In this case you can let the view inherit from the DataAccessRRN.Fetch view:
Source Object | Verb | Target Object |
---|---|---|
MyEntity.MyView | is a VW | WSYBASE/DataAccessRRN.Fetch |
The BlockFetchRRNWrapper function will call the BlockFetch function that is scoped by the view. Note that as the DataAccessRRN view inherits from STORAGE/DataAccess.Fetch, the other functions scoped by this view will also be included by MyView.
If you want to use another BlockFetch under the view, you must perform this replacement:
Source Object | Verb | Target Object |
---|---|---|
MyEntity.MyView.BlockFetchRRNWrapper | replaces FNC
...by FNC |
MyEntity.MyView.BlockFetch
MyEntity.MyView.MyBlocFetch |
3. If you can't let the view inherit from WSYBASE/DataAccessRRN.Fetch because you already have an "is a VW" triple for the view or if you want to have the BlockFetchRRN wrapper under a view, but does not want the rest of the functions from the STORAGE/DataAccess.Fetch view.
In this case you must add a function to your view, let the function inherit from the abstract BlockFetchRRNWrapper function, and replace the BlockFetch to call:
Source Object | Verb | Target Object |
---|---|---|
MyEntity.MyView | function FNC | MyBlockFetchRRNWrapper |
MyEntity.MyView.MyBlockFetchRRNWrapper | is a FNC | WSYBASE/DataAccessRRN.Fetch.BlockFetchRRNWrapper |
MyEntity.MyView.MyBlockFetchRRNWrapper | replaces FNC
...by FNC |
WSYBASE/DataAccessRRN.Fetch.BlockFetch
MyEntity.MyView.MyBlockFetch |
MyEntity.MyView.MyBlockFetchRRNWrapper | replaces VW
...by VW |
WSYBASE/DataAccessRRN.Fetch
MyEntity.MyView |
The BlockFetchWrapperRRN provides a way to add necessary functionality for being able to provide data for the grids in the Ext JS WebsydianExpress framework to standard BlockFetch functions.
This can be a good way to reuse existing BlockFetch functions in the Ext JS WebsydianExpress framework. However, if you are going to create new BlockFetch functions for this purpose, we recommend using functions inheriting from WSYBASE/RRNEntityRelationalTable.Fetch.WsyStatelessBlockFetchRRN instead.